import React from 'react';
import { Icon } from 'antd';
import styles from './index.less';

const SubmitWorkResultRemindPC = props => {
    const { state = 1, remindText = '感谢您的合作，稍待面试官评审后， 我们将第一时间通知您结果！' } = props;

    const { iconType, iconColor, resultHint } = React.useMemo(() => {
        if (state === 1) {
            return {
                iconType: 'check-circle',
                iconColor: 'green',
                resultHint: '提交成功'
            };
        }
        return {
            iconType: 'check-circle',
            iconColor: 'green',
            resultHint: '已提交过，无需再次提交'
        };
    }, [state]);

    return (
        <div className={styles.container}>
            <p className={styles.remindHint}>
                <Icon
                    type={iconType}
                    theme="filled"
                    style={{ color: iconColor }}
                    className={[styles.pr24, styles.iconSet].join(' ')}
                />
                <span className={styles.resultHint}>{resultHint}</span>
            </p>

            <span className={styles.remindText}>{remindText}</span>
        </div>
    );
};
export default SubmitWorkResultRemindPC;
